//
//  WebInfo_AddFeedBack.m
//  EpointFrame5
//
//  Created by 李亚春 on 14-2-26.
//  Copyright (c) 2014年 Epoint. All rights reserved.
//

#import "WebInfo_AddFeedBack.h"

@implementation WebInfo_AddFeedBack

-(void)execute
{
    NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
    NSString *ValidateData = [EpointBizTools getToken];
    NSString *url = self.getMobileOAWebserviceURL;
    NSString *wsNamespace = NSLocalizedString(@"Epoint_DNet_WS_NameSpace", @"");
    NSString *userguid = [userDefaults objectForKey:Epoint_User_UserGuid];
    NSString *InfoGuid = [params objectForKey:@"InfoGuid"];
    NSString * FeedBackContent= [params objectForKey:@"FeedBackContent"];
    
    FeedBackContent = [EpointStringUtil filterXmlString:FeedBackContent];
    NSString *ParasXml = @"<![CDATA[<?xml version=\"1.0\" encoding=\"gb2312\"?><paras><UserGuid>%@</UserGuid><InfoGuid>%@</InfoGuid><FeedBackContent>%@</FeedBackContent><ATTACHList></ATTACHList></paras>]]>";
    ParasXml = [NSString stringWithFormat:ParasXml,userguid,InfoGuid,FeedBackContent];
    
    EpointWebServiceUtil *ws = [[EpointWebServiceUtil alloc]initWithUrl:url namespace:wsNamespace method:@"WebInfo_AddFeedBack"];
    [ws addParameterForString:@"ValidateData" value:ValidateData];
    [ws addParameterForString:@"ParasXml" value:ParasXml];
    NSString *bs =  ws.start;
    NSMutableArray *result = [self validateXMLWS2:bs];
    //    NSString *msg = [result objectAtIndex:1];
    if ([[result objectAtIndex:0]isEqualToString:@"1"]) {
        [self toastInTask:@"反馈完成！"];
        [self exeSuccessWithData:@""];
    }
}

@end
